# ======采样数据======
# 见data/sample_data.py

# ======分割======
from Segmentation.seg_unet import segment, UnetModel
input_folder = "datasets/ddr/images"
output_folder = "datasets/ddr/images_segmented"
csv_file = "datasets/ddr/DR_grading_sampled.csv"

# 加载三个模型，分别对应三个病理特征
model1 = UnetModel(
    model_path="Segmentation/models/best_model_Microaneurysms.pth",
)

model2 = UnetModel(
    model_path="Segmentation/models/best_model_Hemorrhages.pth",
)

model3 = UnetModel(
    model_path="Segmentation/models/best_model_CottonWoolSpots.pth",
)

# 执行推理
segment(input_folder, output_folder, model1, model2, model3, csv_file)

# ======聚类======